package Interview;

public class D8 {
	public static int function(int num){
		int res = 0;
		while(num!=1){
			if(num%2==0){
				res++;
				num/=2;
			}else{
				num--;
				res++;
			}
		}
		return res;
	}
	public static void main(String[] args) {
		System.out.println(function(20131111));
	}
}
